package com.xbb.service.impl;

import com.xbb.entity.Message;
import com.xbb.mapper.MessageMapper;
import com.xbb.service.IMessageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mr xie
 * @since 2020-06-15
 */
@Service
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements IMessageService {

    @Autowired
    MessageMapper messageMapper;

    @Override
    public Message getMessage(Integer id) {
        return messageMapper.getMessage(id);
    }

    @Override
    public List<Message> getMessages(Integer id) {
        return messageMapper.getMessages(id);
    }

    @Override
    public boolean updateBatchMessage(Integer uid) {
        return messageMapper.updateBatchMessage(uid);
    }
}
